using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;using Maxleaf.EDI.Domain.K3;

namespace Maxleaf.EDI.DataAccess.K3
{
    public class t_BaseManageTypeMap : EntityTypeConfiguration<t_BaseManageType>
    {
        public t_BaseManageTypeMap()
        {
            // Primary Key
            this.HasKey(t => t.FID);

            // Properties
            this.Property(t => t.FID)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            this.Property(t => t.FName)
                .IsRequired()
                .HasMaxLength(50);

            this.Property(t => t.FNumber)
                .IsRequired()
                .HasMaxLength(10);

            this.Property(t => t.FFullNumber)
                .IsRequired()
                .HasMaxLength(255);

            this.Property(t => t.FClassTypeID)
                .IsRequired()
                .HasMaxLength(48);

            // Table & Column Mappings
            this.ToTable("t_BaseManageType");
            this.Property(t => t.FID).HasColumnName("FID");
            this.Property(t => t.FName).HasColumnName("FName");
            this.Property(t => t.FNumber).HasColumnName("FNumber");
            this.Property(t => t.FParentID).HasColumnName("FParentID");
            this.Property(t => t.FLogic).HasColumnName("FLogic");
            this.Property(t => t.FDetail).HasColumnName("FDetail");
            this.Property(t => t.FDiscontinued).HasColumnName("FDiscontinued");
            this.Property(t => t.FLevels).HasColumnName("FLevels");
            this.Property(t => t.FFullNumber).HasColumnName("FFullNumber");
            this.Property(t => t.FClassTypeID).HasColumnName("FClassTypeID");
        }
    }
}
